package com.zcxy.sleep;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication
public class SleepApplication implements CommandLineRunner {

    @Value("${server.port:8082}")
    private String serverPort;

    @Value("${server.servlet.context-path:}")
    private String serverContextPath;

    public static void main(String[] args) {
        SpringApplication.run(SleepApplication.class, args);
    }

    @Override
    public void run(String... strings){
        log.info("=======================Application Startup Success=======================");
        log.info("User Info >> http://127.0.0.1:{}{}/....", serverPort, serverContextPath);
        log.info("Logout >> http://127.0.0.1:{}{}/...", serverPort, serverContextPath);
        log.info("=======================Application Startup Success=======================");
    }

}
